<template>
  <footer>
    <div
      class="footer-item"
      v-for="item in footerList"
      :key="item.title"
      @click="tabChange(item.url)"
    >
      <span class="iconfont" :class="item.icon"></span>
      <p>{{ item.title }}</p>
    </div>
  </footer>
</template>

<script>
export default {
  data() {
    return {
      footerList: [
        {
          title: "电影/影院",
          icon: "icon-dianying",
          url: "/movies",
        },
        {
          title: "视频",
          icon: "icon-shipin",
          url: "/video",
        },
        {
          title: "小视频",
          icon: "icon-shouye",
          url: "/mini",
        },
        {
          title: "演出",
          icon: "icon-menpiao",
          url: "/show",
        },
        {
          title: "我的",
          icon: "icon-wode",
          url: "/mine",
        },
      ],
    };
  },
  methods: {
    tabChange(url) {
      this.$router.push("/home" + url);
    },
  },
};
</script>

<style lang="less" scoped>
@import "../../../assets/css/var.less";
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50px;
  background: #fff;
  border-top: 1px solid @border-color;
  display: flex;
  font-size: @xs-font;

  .footer-item {
    flex: 1;
    .center();
    flex-direction: column;

    .iconfont {
      font-size: @l-font;
    }
  }
}
</style>
